|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.pnr.hci.InvalidItemException
public class InvalidItemException
Exception thrown when the rating and charging context is invalid in the connected SAP CC system when processing a business operation. This exception relates to a problem between:
chargeable item coming from your client application (mediation system, CRM, ERP, provisionning system)chargeable item class defined
in the identified pricing catalog of the digital service delivered by the service provider.
Important Notes
invalid item listener customized in your client application
manage this type of exception.
BatchChargeException
or the RerateSubscriptionException as the cause.
The possible reasons are:
| Failure | Reason Code | Reason Code (HCI) | Customizing and Integration | Troubleshooting (Next Steps) |
|---|---|---|---|---|
Bad configuration
| 0 | badConfiguration
|
Note To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section in this topic. Refer to the information available in the Customizing subsection of each failure to develop your integration code. |
Note For troubleshooting investigations, see the Field Detail section in this topic. Refer to the information available in the Next Steps subsection of each failure. |
Wrong property type
| 1 | wrongPropertyType
| ||
Property not found
| 2 | propertyNotFound
| ||
Division by zero
| 4 | divisionByZero
| ||
Incompatible currencies
| 5 | incompatibleCurrencies
| ||
Chargeable item (CI) null
| 6 | nullChargeableItem
| ||
Invalid property
| 7 | invalidPropertyValue
| ||
Unrated (deprecated and now revoked)
| 3 | unrated
|
Consider the detailed information in the Field Detail section in this topic.
Tip
For troubleshooting during the implementation of SAP Converent Charging, see the SAP CC Error Code Reference in the SDK or in SAP Help Portal.
Depending on your business requirements, design and develop the handling functions in your client application.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="invalidItemFault">
<xs:complexType>
<xs:sequence>
<xs:element ref="cause" minOccurs="0" maxOccurs="1"/> <!-- Due to legacy use of this exception, no error may be provided -->
<xs:element ref="causedBy" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="error" type="InvalidItemFaultErrorType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="InvalidItemFaultErrorType">
<xs:restriction base="xs:string">
<xs:enumeration value="notAuthorized"/>
<xs:enumeration value="badConfiguration"/>
<xs:enumeration value="wrongPropertyType"/>
<xs:enumeration value="propertyNotFound"/>
<xs:enumeration value="unrated"/> <!-- deprecated -->
<xs:enumeration value="divisionByZero"/>
<xs:enumeration value="incompatibleCurrencies"/>
<xs:enumeration value="nullChargeableItem"/>
<xs:enumeration value="invalidPropertyValue"/>
</xs:restriction>
</xs:simpleType>
| Field Summary | |
|---|---|
static int |
BAD_CONFIGURATION
0: Error when the price plan is badly configured in the pricing catalog (in master data) configured in the connected SAP CC system. |
static int |
CI_NULL
6: Error when the chargeable item (CI) is null or its name is null. |
static int |
DIVISION_BY_ZERO
4: Error when a division by zero occured during the processing. |
static int |
INCOMPATIBLE_CURRENCIES
5: Error when currencies are not compatible; This kind of error happens when there is a mismatch between the currency of the account and the currency declared at the charge level. |
static int |
INVALID_PROPERTY_VALUE
7: Error when a property of the rating context has an invalid value. |
static int |
NOT_AUTHORIZED
-1: Error when a no access is raised when executing a price plan in a charge configured in master data. |
static int |
PROPERTY_NOT_FOUND
2: Error when a property is not found in the rating context. |
static int |
UNRATED
Deprecated. This reason code is deprecated and can no longer be returned |
static int |
WRONG_PROPERTY_TYPE
1: Error when a property in the rating context of the charging operation request does not have the right type. |
| Constructor Summary | |
|---|---|
InvalidItemException()
Constructs an empty exception. |
|
InvalidItemException(int reason,
java.lang.String message)
Constructs an exception with an error code and a message; The message contains a human readable text. |
|
InvalidItemException(int reason,
java.lang.String message,
ChargingResult chargingResult)
Constructs an exception with an error code and a message; The message contains a human readable text. |
|
InvalidItemException(int reason,
java.lang.String message,
IError error)
Constructs an exception with an error code and a message; The message contains a human readable text. |
|
InvalidItemException(int reason,
java.lang.String message,
IError error,
ChargingResult chargingResult)
Constructs an exception with a cause, a message, an error, and a ChargingResult
that explain why the charging is forbidden. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
ChargingResult |
getChargingResult()
Returns the ChargingResult that provides structured information about the exception. |
int |
getError()
Deprecated. Use getReason() instead. Deprecated since version 3.0. |
IError |
getIError()
Gets the error contained in this Exception. |
java.lang.String |
getMessage()
Returns the detailed message explaining why the rating context is invalid. |
int |
getReason()
Returns the reason why the rating context is invalid. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setError(IError error)
Sets the error contained in this Exception. |
| Methods inherited from class com.highdeal.hci.OperationFailureException |
|---|
getOperandReference |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NOT_AUTHORIZED
public static final int BAD_CONFIGURATION
Use the same inputs in the rating context that generates such error and use the trial run tool in the SAP CC Core Tool user interface to detect the price plan component in error and correct the configuration accordingly.
public static final int WRONG_PROPERTY_TYPE
This kind of error might come when there is a mismatch between the type of the property declared in the chargeable item class and the one sent in the chargeable item.
public static final int PROPERTY_NOT_FOUND
@Deprecated public static final int UNRATED
chargeable item (CI)
is not rated by executing the price plan.
public static final int DIVISION_BY_ZERO
public static final int INCOMPATIBLE_CURRENCIES
public static final int CI_NULL
public static final int INVALID_PROPERTY_VALUE
| Constructor Detail |
|---|
public InvalidItemException()
public InvalidItemException(int reason,
java.lang.String message)
message - The messagereason - The error
public InvalidItemException(int reason,
java.lang.String message,
ChargingResult chargingResult)
ChargingResult.
message - The messagereason - The errorchargingResult - The ChargingResult which provides structured information about the exception
public InvalidItemException(int reason,
java.lang.String message,
IError error)
message - The messagereason - The reasonerror - The error associated to this exception
public InvalidItemException(int reason,
java.lang.String message,
IError error,
ChargingResult chargingResult)
ChargingResult
that explain why the charging is forbidden. The message contains
a human readable text. It explains the reason why the
charge process is forbidden, and it provides a structured information in the ChargingResult.
reason - The reasonmessage - The messageerror - The error codechargingResult - The ChargingResult which provides structured information about the exception| Method Detail |
|---|
@Deprecated public int getError()
getReason() instead. Deprecated since version 3.0.
BAD_CONFIGURATION,
WRONG_PROPERTY_TYPE,
PROPERTY_NOT_FOUND,
UNRATED,
DIVISION_BY_ZERO,
INCOMPATIBLE_CURRENCIES,
CI_NULL,
INVALID_PROPERTY_VALUEpublic int getReason()
BAD_CONFIGURATION,
WRONG_PROPERTY_TYPE,
PROPERTY_NOT_FOUND,
UNRATED,
DIVISION_BY_ZERO,
INCOMPATIBLE_CURRENCIES,
CI_NULL,
INVALID_PROPERTY_VALUEpublic java.lang.String getMessage()
getMessage in class java.lang.Throwablepublic IError getIError()
error contained in this Exception.
public void setError(IError error)
error contained in this Exception.
error - The error contained in this exceptionpublic ChargingResult getChargingResult()
IChargingResultHolderExceptionChargingResult that provides structured information about the exception.
Example
The ForbiddenChargeException and InvalidItemException exceptions include
such a charging result complex object.
getChargingResult in interface IChargingResultHolderExceptionChargingResult that provides structured information about the exceptionpublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be added
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||